Title: SQL W3S (By-BKK) / 002 Syntax
Tags: Obsidian_to_Anki

Q: What is a typical SQL statement used for?
A: Performing actions on a database

Q: True/False: SQL keywords are case sensitive
A: False

Q: Which SQL keyword returns all records from a table named 'Customers'?
A: SELECT * FROM Customers;

Q: How are tables identified in a database?
A: By a table name

Q: What is a record in a database table?
A: A row of data

Q: City, PostalCode, Country are examples of what in a table?
A: Columns or fields

Q: What does the semicolon at the end of SQL statements do?
A: Separates SQL statements in some databases

Q: True/False: Semicolon is mandatory at the end of every SQL statement in all databases
A: False

Q: Which database sample is used for SQL examples in W3Schools?
A: Northwind

Q: SELECT, UPDATE, DELETE, INSERT INTO, CREATE DATABASE, ALTER DATABASE, CREATE TABLE, ALTER TABLE, DROP TABLE, CREATE INDEX, DROP INDEX are examples of what in SQL?
A: Important SQL commands

Q: Which SQL command extracts data from a database?
A: SELECT

Q: What does the UPDATE command do in SQL?
A: Updates data in a database

Q: Which SQL command adds new data to a table?
A: INSERT INTO

Q: CREATE DATABASE is used for what purpose?
A: Creating a new database

Q: How do you modify a table structure in SQL?
A: ALTER TABLE

Q: What command deletes a database table?
A: DROP TABLE

Q: How do you create an index in SQL?
A: CREATE INDEX

Q: What does DROP INDEX do in SQL?
A: Deletes an index

Q: Which command removes data from a table?
A: Truncate and Delete.